<!DOCTYPE html>
<html language="cn">

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
  <title>
    <%=htmlWebpackPlugin.options.title %>
  </title>
  <link href="../../css/reset.css" rel="stylesheet" type="text/css">
  <script src="../../params.js"></script>
  <script>
    function IEVersion() {
      var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串  
      var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1; //判断是否IE<11浏览器  
      var isEdge = userAgent.indexOf("Edge") > -1 && !isIE; //判断是否IE的Edge浏览器  
      var isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf("rv:11.0") > -1;
      if (isIE) {
        var reIE = new RegExp("MSIE (\\d+\\.\\d+);");
        reIE.test(userAgent);
        var fIEVersion = parseFloat(RegExp["$1"]);
        if (fIEVersion == 7) {
          return 7;
        } else if (fIEVersion == 8) {
          return 8;
        } else if (fIEVersion == 9) {
          return 9;
        } else if (fIEVersion == 10) {
          return 10;
        } else {
          return 6;//IE版本<=7
        }
      } else if (isEdge) {
        return 'edge';//edge
      } else if (isIE11) {
        return 11; //IE11  
      } else {
        return -1;//不是ie浏览器
      }
    }
    if (IEVersion() > -1) {
      document.write("<scri"+"pt src='https://cdn.bootcss.com/babel-polyfill/7.0.0-beta.49/polyfill.min.js' type='text/javascript'></s"+"cript>");
    }
  </script>
  <script src="https://cdn.bootcss.com/vue/2.5.16/vue.min.js"></script>
  <script src="https://cdn.bootcss.com/axios/0.18.0/axios.min.js"></script>
  <script src="../../lib/vue-axios.2.0.2.min.js"></script>

  <% if(htmlWebpackPlugin.options.needVuex===true){%>
  <script src="https://cdn.bootcss.com/vuex/3.0.1/vuex.min.js"></script>
  <%}%>
  <% if(htmlWebpackPlugin.options.needRouter===true){%>
  <script>var needRouter = true;</script>
  <%}else{%>
  <script>var needRouter = false;</script>
  <%}%>
  <script lang="javascript">
    if (navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i) != null) {
      document.write('<link href="https://unpkg.com/vue-ydui@1.2.6/dist/ydui.px.css" rel="stylesheet" type="text/css">');
      document.write("<scri" + "pt src='https://cdn.bootcss.com/vue-router/3.0.1/vue-router.min.js' type='text/javascript'></s" + "cript>");
      document.write("<scri" + "pt src='https://unpkg.com/vue-ydui@1.2.6/dist/ydui.px.js' type='text/javascript'></s" + "cript>");
    } else {
      document.write('<link href="https://unpkg.com/element-ui@2.4.6/lib/theme-chalk/index.css" rel="stylesheet" type="text/css">');
      needRouter && document.write("<scri" + "pt src='https://cdn.bootcss.com/vue-router/3.0.1/vue-router.min.js' type='text/javascript'></s" + "cript>");
      document.write("<scri" + "pt src='https://unpkg.com/element-ui@2.4.6/lib/index.js' type='text/javascript'></s" + "cript>");
    }
  </script>
</head>

<body>
  <div id="app">
    <router-view></router-view>
  </div>
</body>

</html>